﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="targyakKezelese.aspx.cs" Inherits="NEMProjectWebApp.Pages.Oktato.targyakKezelese" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <center>
        <%--<asp:ValidationSummary ID="ValidationSummary1" runat="server" />--%>
        <table>
            <tr>
                <td>
                    Tárgy Neve:
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="UjTargyTextBox" runat="server" Style="text-align: left; margin-left: 0px"
                        Width="220px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Kezdés:
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="KoraTextBox" runat="server" Width="67px" MaxLength="2"></asp:TextBox>
                    <asp:Label ID="Label1" runat="server" Text="óra"></asp:Label>
                    <asp:TextBox ID="KpercTextBox" runat="server" Width="67px" MaxLength="2"></asp:TextBox>
                    <asp:Label ID="Label2" runat="server" Text="perc"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    Befejezés:
                </td>
                <td style="text-align: left">
                    <asp:TextBox ID="VoraTextBox" runat="server" Width="67px" MaxLength="2"></asp:TextBox>
                    <asp:Label ID="Label3" runat="server" Text="óra"></asp:Label>
                    <asp:TextBox ID="VpercTextBox" runat="server" Width="67px" MaxLength="2"></asp:TextBox>
                    <asp:Label ID="Label4" runat="server" Text="perc"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="Lefty" colspan="2">
                    LeÍrás:
                    <br />
                    <asp:TextBox ID="TargyLeirasTextBox" runat="server" Width="400px" Height="44px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="Center" colspan="2">
                    <asp:Button ID="felveszButton" runat="server" Text="Tárgy felvétele" OnClick="felveszButton_Click" />
                    <asp:ScriptManager ID="ScriptManager1" runat="server">
                    </asp:ScriptManager>
                </td>
            </tr>
        </table>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:ListBox ID="TargyakListBox" runat="server" AutoPostBack="True" 
                    DataSourceID="SqlDataSource1" DataTextField="TargyNeve" DataValueField="T_ID" 
                    OnSelectedIndexChanged="ListBox1_SelectedIndexChanged" Width="400px">
                </asp:ListBox>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:masterConnectionString %>" 
                    SelectCommand="SELECT Targy.T_ID, Targy.TargyNeve, Targy.Kezd, Targy.Veg FROM Targy INNER JOIN UserTargyKapcs ON Targy.T_ID = UserTargyKapcs.Targy_ID and User_ID = @User_ID">
                    <SelectParameters>
                        <asp:SessionParameter DefaultValue="0" Name="User_ID" SessionField="User_ID" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <br />
                Tárgy ID:
                <asp:Label ID="IDLabel" runat="server" Text="0"></asp:Label>
                <br />
                Kezdés:
                <asp:Label ID="labelKezd" runat="server" Text="0"></asp:Label>
                &nbsp;-
                <asp:Label ID="labelVege" runat="server" Text="0"></asp:Label>
                <br></br>
                <br>
                <asp:Button ID="torolButton" runat="server" onclick="torolButton_Click" 
                    Text="Töröl" />
                </br>
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
            <br></br>
            &nbsp; </br>
    </center>
</asp:Content>
